import {Link, Outlet} from "react-router-dom";
import {useState} from "react";


const Index = () => {

    const [inputValue,setInputValue]=useState('');


    return (
        <div>
            <input
                type="text"
                value={inputValue}
                onChange={e=>setInputValue(e.target.value)}
            />
            <br/>

            <Link to="/equipment">设备</Link><br/>
            <Link to="/material">材料</Link><br/>

            <span>{inputValue}</span>
            <br/>
            <hr/>
            {/*放置子路由组件*/}
            <Outlet/>

        </div>
    )
}

export default Index